SADAD APIs | Query Transaction
PayTabs provides you with a collection of API endpoints which used to process all payments, regardless of if they are through either your own payment pages, the managed payment pages, or if you are using the hosted payment pages.
If you have a sadad transaction that you want to fetch its details and know more about its status, type, etc... you can use the sadad query transaction endpoint, as it will return the details of the requested transaction. In this article, we walk you through how to use and manage the mentioned endpoint.The Endpoint and Related Postman Collection
In this tutorial, we will rely on the API Endpoint, mentioned on PayTabs API endpoints postman collection, which you can access fromKSA PayTabs Postman APIs Collection. The endpoint will need to be accessed with a POST request on the below-mentioned URLPOST | {{domain}}/payment/apm/sadad/ifs/inquiry |
---|
Be Aware Of
Please note that not using the proper endpoint URL {domain} will lead to authentication issues within your responses. To find the your proper domain you can read ourWhat is my (Region)/(endpoint URL)?tutorial article.
- KSA
https://secure.paytabs.sa/payment/apm/sadad/ifs/inquiry
Request Parameters
To initiate a query payment request, there are minimum required parameters that need to be passed with valid information. The specification of these required parameters is clarified below according to the query type:Sadad Query via Transaction Reference
In this type, you can initiate query transaction requests using your "profile_id" and the requested "tran_ref". You will receive a response object of this specific transaction you referred to. Kindly check the request parameters' specifications below:
- The Minimum Required Parameters
Parameter | Data Type | Min | Max | Required |
---|---|---|---|---|
| INT | Accept only valid profile number | ✔ | |
The merchant Profile ID you can get from your PayTabs dashboard. For more information please check ourHow to get your account information from PT2 Dashboard?tutorial article. To know more about this parameter pleaseclick here. | ||||
| ||||
| STRING | ✔ | ||
Indicates the Transaction Reference on the Paytabs side. For more information please check ourRequest/Response Parameters | Transaction Reference (tran_ref).. | ||||
|
Request & Response Payload Samples
This section is dedicated give you a sample API request payload using the above mentioned required parameters, along with showing you the response payload received upon using the request payload.- Required Parameters Sample Payloads
The below sample request payload will show you how you can pass the above-mentioned required parameter/s, which are needed to be passed with valid values to perform a request. Along with the response payload received after using this request payload.
- Sample Request Payload
- Sample Response Payload
{
"profile_id": "59020",
"tran_ref": "TST2016700000692"}
}
{
"tran_ref": "TST2330300802861",
"tran_type": "Payment Request",
"original_tran_type": "Sale",
"cart_id": "test_12346",
"cart_description": "ss",
"cart_currency": "SAR",
"cart_amount": "250.00",
"tran_currency": "SAR",
"tran_total": "250.00",
"customer_details": {
"name": "test test",
"email": "[email protected]",
"phone": "0505692765",
"street1": "test 123",
"city": "jeddah",
"state": "01",
"country": "SA",
"zip": "2343",
"ip": "109.82.212.59"
},
"shipping_details": {
"name": "test test",
"email": "[email protected]",
"phone": "0505692765",
"street1": "test 123",
"city": "jeddah",
"state": "01",
"country": "SA",
"zip": "2343"
},
"payment_result": {
"response_status": "P",
"response_code": "23432001250",
"response_message": "Pending",
"transaction_time": "2023-10-30T14:46:31Z"
},
"payment_info": {
"payment_method": "SADAD (IFS)",
"card_scheme": "Unknown",
"payment_description": "Sadad (IFS)",
"issuerCountry": "SA",
"issuerName": "IFS"
},
"serviceId": 2,
"profileId": 83373,
"merchantId": 2571,
"trace": "PMNT0202.654398F6.00027F6A"
}